<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>


<form method="get">
    Search Key:<input type="text" name="q" value="{{ q|default:""}}" placeholder="输入文字" id="keyword"/>
    <input type="submit" value="来吧" class="search-btn"/>
</form>
{% if not msg %}
    {% for hit in result %}
    <p>id:{{ hit.id }}</p>
    <p>score:{{ hit.score }}</p>
    <p>type:{{ hit.type }}</p>
    <p>level:{{ hit.level }}</p>
{#    <p>origin:{{ hit.origin|safe }}</p>#}
    <p>highlight:{{ hit.highlight|safe }}</p>
{% endfor %}

    {% else %}
    {{ msg }}
{% endif %}







{#<p>Search Key:</p>#}
{#{% for hit in result.hits.hits %}#}
{#    {{ hit }}#}
{#    {% for origin in hit._source.content %}#}
{#        <p>文章id: {{ origin.id }}</p>#}
{#        <p>原文 {{ origin.content }}</p>#}
{#    {% endfor %}#}
{##}
{##}
{#    {% for value in hit.highlight.content %}#}
{#        <p>高亮 {{ value|safe }}</p>#}
{#    {% endfor %}#}
{#{% endfor %}#}
</body>
</html>